<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require '../com.swiss.mooh.dao.impl/ImageContentDaoImpl.php';
require '../com.swiss.mooh.service/ImageContentServiceImpl.php';

$conf = parse_ini_file("../../model-db-connection/configuration.ini");

$dispatcher = new ImageContentDaoImpl();
$imageContentService = new ImageContentServiceImpl($dispatcher);
$descID = $_POST['descID'];
$listOfFileVO = $imageContentService->getAllImageContentByDescID($descID);
for ($i = 0; $i < $listOfFileVO->Size(); $i++) {
    ?>
    <a href="#" class="list-group-item">   
        <span class="badge" onclick="getLink('<?= $conf['applicationImageServerPath'] ?><?= $listOfFileVO->GetObj($i)->getImageName(); ?>')"><i class="fa fa-link"></i></span>
        <span class="badge" onclick="deleteImageByName2('<?= $listOfFileVO->GetObj($i)->getImageName(); ?>', '<?= $descID ?>')"><i class="fa fa-trash"></i></span>
        <span>
            <span class="fancies fancybox-effects-d" href="<?= $conf['applicationImageServerPath'] ?><?= $listOfFileVO->GetObj($i)->getImageName(); ?>" title="<?= $listOfFileVO->GetObj($i)->getImageName(); ?>">
                <i class="fa fa-fw fa-calendar"></i><?= $listOfFileVO->GetObj($i)->getImageName(); ?>
            </span>
        </span>
    </a>
    <?php
}